x=file.c
HOME=/usr/posix
file.o

${x:-$(ls)}

unset X
echo ${X:=abc}
abc

unset posix
echo ${posix:?}
sh: posix: parameter null or not set

set a b c
echo ${3:+posix}
posix


echo ${#HOME}
10

echo ${x%.c}.o


    x=posix/src/std
    echo ${x%%/*}
    posix

    x=$HOME/src/cmd
    echo ${x#$HOME}
    /src/cmd

    x=/one/two/three
    echo ${x##*/}
    three

"${x#*}"

${x#"*"}